package cn.exercises.oop05;

public class Employee {
    // 姓名 工号 工资
    private String name;
    private String no;
    private int salary;

    public Employee() {
    }

    public Employee(String name, String no, int salary) {
        this.name = name;
        this.no = no;
        this.salary = salary;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return no
     */
    public String getNo() {
        return no;
    }

    /**
     * 设置
     * @param no
     */
    public void setNo(String no) {
        this.no = no;
    }

    /**
     * 获取
     * @return salary
     */
    public int getSalary() {
        return salary;
    }

    /**
     * 设置
     * @param salary
     */
    public void setSalary(int salary) {
        this.salary = salary;
    }

    public String toString() {
        return "Employee{name = " + name + ", no = " + no + ", salary = " + salary + "}";
    }

    public void work(){
        System.out.println(this.name + " is working");
    }
}
